import requests

BASE = "http://localhost:8080"

response = requests.get(f"{BASE}/api/tasks")
tasks = response.json()

print("任务状态:")
for t in tasks:
    print(f"  {t['name']}: 处理={t['processed']}, 失败={t['failed']}, 错误=\"{t['lastErrorMsg']}\"")
